Skip to content

try adapt sonar coverage#653

Merged
AlexInLog merged 13 commits into
v2from
coverage
Oct 8, 2024
Merged

try adapt sonar coverage#653
AlexInLog merged 13 commits into
v2from
coverage

Conversation

@AlexInLog

@AlexInLog AlexInLog commented Oct 7, 2024

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Chores
    • Improved the configuration for generating coverage reports, enhancing the process for developers.
    • Streamlined the command for merging profile data, allowing for more flexible input of profile files.
    • Enforced necessary build configuration checks for coverage reporting.
    • Updated compilation flags for coverage analysis to simplify the process.
    • Introduced structured presets for managing build and test configurations, focusing on sanitization and coverage analysis.
    • Specified the location of test files for SonarQube analysis, ensuring comprehensive test coverage.
    • Adjusted the order of source directories for analysis, improving clarity in project structure.

@coderabbitai

coderabbitai Bot commented Oct 7, 2024

Copy link
Copy Markdown
Contributor
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

The changes in the pull request focus on modifying the cmake/coverage.cmake, CMakePresets.json, and sonar-project.properties files to enhance the coverage report generation process and streamline build configurations. Key updates include a new conditional check for the RPP_BUILD_TESTS_TOGETHER flag, adjustments to the RPP_COVERAGE_TARGETS variable syntax, and simplifications in the profile data merging command. Additionally, the CMakePresets.json file has been updated to manage build and test presets more effectively, while the sonar-project.properties file has been modified to specify test file locations for SonarQube analysis.

Changes

File Change Summary
cmake/coverage.cmake - Added a check for RPP_BUILD_TESTS_TOGETHER flag with a fatal error if not set.
- Updated syntax for RPP_COVERAGE_TARGETS from --object to -object.
- Simplified profile data merging command using *.profraw wildcard.
- Modified llvm-cov report command to remove tests directory from ignore pattern.
CMakePresets.json - Removed --coverage flag from CMAKE_CXX_FLAGS in ci-coverage-clang preset.
- Introduced ci-build preset for CI builds.
- Defined multiple test presets, including ci-tests and ci-sanitize for specific configurations.
sonar-project.properties - Added property sonar.tests=src/tests to specify the location of test files for SonarQube analysis.
- Removed src/tests references from sonar.sources, sonar.coverage.exclusions, and sonar.cpd.exclusions.

Possibly related PRs

  • Change sonarcloud analysis method #652: The changes in the sonar-project.properties file in this PR involve modifications related to coverage exclusions, which are also addressed in the main PR's updates to the same file, indicating a focus on coverage report generation and analysis.

Poem

In the land of code where rabbits play,
Coverage reports come out to stay.
Flags are checked, and targets align,
With wildcards dancing, all is fine!
So hop along, let’s celebrate,
For streamlined builds, we can’t be late! 🐰✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions

github-actions Bot commented Oct 7, 2024

Copy link
Copy Markdown
Contributor

BENCHMARK RESULTS (AUTOGENERATED)

ci-ubuntu-gcc

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 305.57 ns 2.18 ns 2.19 ns 1.00
Subscribe empty callbacks to empty observable via pipe operator 304.09 ns 2.18 ns 2.18 ns 1.00

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 703.79 ns 0.31 ns 0.31 ns 1.00
from array of 1 - create + subscribe + current_thread 1041.28 ns 3.73 ns 3.73 ns 1.00
concat_as_source of just(1 immediate) create + subscribe 2239.47 ns 149.94 ns 150.51 ns 1.00
defer from array of 1 - defer + create + subscribe + immediate 738.32 ns 0.31 ns 0.31 ns 1.00
interval - interval + take(3) + subscribe + immediate 2120.31 ns 59.62 ns 59.60 ns 1.00
interval - interval + take(3) + subscribe + current_thread 2986.63 ns 32.67 ns 32.68 ns 1.00
from array of 1 - create + as_blocking + subscribe + new_thread 29911.97 ns 30237.06 ns 29528.32 ns 1.02
from array of 1000 - create + as_blocking + subscribe + new_thread 40627.28 ns 53998.21 ns 53462.62 ns 1.01
concat_as_source of just(1 immediate) and just(1,2 immediate)create + subscribe 3555.19 ns 218.08 ns 213.62 ns 1.02

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 1099.51 ns 0.31 ns 0.31 ns 1.00
immediate_just+filter(true)+subscribe 835.60 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+skip(1)+subscribe 986.42 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,1,2)+distinct_until_changed()+subscribe 878.81 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+first()+subscribe 1231.57 ns 0.31 ns 0.31 ns 1.00
immediate_just(1,2)+last()+subscribe 923.53 ns 0.31 ns 0.31 ns 1.00
immediate_just+take_last(1)+subscribe 1106.36 ns 18.04 ns 18.34 ns 0.98
immediate_just(1,2,3)+element_at(1)+subscribe 837.35 ns 0.31 ns 0.31 ns 1.00

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 264.38 ns 2.18 ns 2.18 ns 1.00
current_thread scheduler create worker + schedule 374.48 ns 5.59 ns 5.60 ns 1.00
current_thread scheduler create worker + schedule + recursive schedule 819.83 ns 56.20 ns 56.06 ns 1.00

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 859.02 ns 0.31 ns 0.31 ns 1.00
immediate_just+scan(10, std::plus)+subscribe 907.04 ns 0.31 ns 0.31 ns 1.00
immediate_just+flat_map(immediate_just(v*2))+subscribe 2328.15 ns 209.58 ns 214.37 ns 0.98
immediate_just+buffer(2)+subscribe 1526.50 ns 13.68 ns 13.99 ns 0.98
immediate_just+window(2)+subscribe + subscsribe inner 2378.58 ns 1354.33 ns 1302.99 ns 1.04

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 839.67 ns - - 0.00
immediate_just+take_while(true)+subscribe 831.85 ns 0.31 ns 0.31 ns 1.00

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 2042.49 ns 0.31 ns 0.31 ns 1.00

Combining Operators

name rxcpp rpp prev rpp ratio
immediate_just(immediate_just(1), immediate_just(1)) + merge() + subscribe 3445.78 ns 261.00 ns 260.69 ns 1.00
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 3719.67 ns 210.76 ns 209.40 ns 1.01
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 180.95 ns 180.49 ns 1.00
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 3531.93 ns 1217.88 ns 1205.25 ns 1.01
immediate_just(1) + zip(immediate_just(2)) + subscribe 2226.29 ns 203.57 ns 202.79 ns 1.00

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 34.77 ns 14.76 ns 27.31 ns 0.54
subscribe 100 observers to publish_subject 199951.83 ns 16024.66 ns 16299.01 ns 0.98
100 on_next to 100 observers to publish_subject 32917.61 ns 20204.15 ns 17408.67 ns 1.16

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1368.13 ns 13.99 ns 14.02 ns 1.00
basic sample with immediate scheduler 1402.76 ns 5.59 ns 5.59 ns 1.00

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 923.11 ns 0.31 ns 0.31 ns 1.00

Error Handling Operators

name rxcpp rpp prev rpp ratio
create(on_next(1), on_error())+on_error_resume_next(immediate_just(2)))+subscribe 2039.59 ns 927.82 ns 920.68 ns 1.01
create(on_error())+retry(1)+subscribe 588.90 ns 133.77 ns 121.93 ns 1.10

ci-macos

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 1022.72 ns 4.04 ns 4.98 ns 0.81
Subscribe empty callbacks to empty observable via pipe operator 1016.84 ns 4.08 ns 4.47 ns 0.91

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 1986.33 ns 0.24 ns 0.29 ns 0.85
from array of 1 - create + subscribe + current_thread 2484.16 ns 33.57 ns 38.59 ns 0.87
concat_as_source of just(1 immediate) create + subscribe 5625.41 ns 445.85 ns 523.71 ns 0.85
defer from array of 1 - defer + create + subscribe + immediate 1991.95 ns 0.24 ns 0.27 ns 0.89
interval - interval + take(3) + subscribe + immediate 4981.08 ns 118.55 ns 139.79 ns 0.85
interval - interval + take(3) + subscribe + current_thread 6065.12 ns 98.57 ns 118.29 ns 0.83
from array of 1 - create + as_blocking + subscribe + new_thread 83062.07 ns 84275.25 ns 108522.89 ns 0.78
from array of 1000 - create + as_blocking + subscribe + new_thread 93305.00 ns 88415.67 ns 110060.78 ns 0.80
concat_as_source of just(1 immediate) and just(1,2 immediate)create + subscribe 8384.94 ns 599.56 ns 668.21 ns 0.90

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 3156.22 ns 0.24 ns 0.28 ns 0.85
immediate_just+filter(true)+subscribe 2165.62 ns 0.24 ns 0.26 ns 0.93
immediate_just(1,2)+skip(1)+subscribe 3603.43 ns 0.24 ns 0.28 ns 0.87
immediate_just(1,1,2)+distinct_until_changed()+subscribe 9912.58 ns 1.22 ns 0.57 ns 2.15
immediate_just(1,2)+first()+subscribe 3266.77 ns 0.24 ns 0.27 ns 0.88
immediate_just(1,2)+last()+subscribe 2412.95 ns 0.24 ns 0.27 ns 0.88
immediate_just+take_last(1)+subscribe 3033.62 ns 0.28 ns 0.26 ns 1.06
immediate_just(1,2,3)+element_at(1)+subscribe 5678.79 ns 0.92 ns 0.29 ns 3.22

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 849.27 ns 4.15 ns 4.67 ns 0.89
current_thread scheduler create worker + schedule 1176.07 ns 39.05 ns 44.08 ns 0.89
current_thread scheduler create worker + schedule + recursive schedule 1966.47 ns 203.66 ns 265.12 ns 0.77

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 2117.01 ns 4.23 ns 5.01 ns 0.84
immediate_just+scan(10, std::plus)+subscribe 2328.12 ns 0.47 ns 0.47 ns 1.00
immediate_just+flat_map(immediate_just(v*2))+subscribe 5518.67 ns 623.48 ns 690.21 ns 0.90
immediate_just+buffer(2)+subscribe 2494.83 ns 64.75 ns 81.17 ns 0.80
immediate_just+window(2)+subscribe + subscsribe inner 5815.17 ns 2417.08 ns 2950.99 ns 0.82

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 2085.63 ns - - 0.00
immediate_just+take_while(true)+subscribe 2142.13 ns 0.25 ns 0.30 ns 0.81

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 28932.96 ns 14.14 ns 5.81 ns 2.43

Combining Operators

name rxcpp rpp prev rpp ratio
immediate_just(immediate_just(1), immediate_just(1)) + merge() + subscribe 7643.85 ns 762.31 ns 1000.06 ns 0.76
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 8361.14 ns 641.16 ns 822.37 ns 0.78
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 578.78 ns 784.78 ns 0.74
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 7978.79 ns 1908.49 ns 2576.23 ns 0.74
immediate_just(1) + zip(immediate_just(2)) + subscribe 5140.49 ns 779.66 ns 952.35 ns 0.82

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 201.33 ns 254.70 ns 63.63 ns 4.00
subscribe 100 observers to publish_subject 1986693.00 ns 124393.00 ns 51845.39 ns 2.40
100 on_next to 100 observers to publish_subject 204759.17 ns 100839.12 ns 20007.24 ns 5.04

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 12525.42 ns 265.11 ns 81.71 ns 3.24
basic sample with immediate scheduler 16625.57 ns 72.46 ns 22.49 ns 3.22

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 9029.19 ns 1.41 ns 0.30 ns 4.61

Error Handling Operators

name rxcpp rpp prev rpp ratio
create(on_next(1), on_error())+on_error_resume_next(immediate_just(2)))+subscribe 8100.15 ns 15441.49 ns 5394.38 ns 2.86
create(on_error())+retry(1)+subscribe 6234.00 ns 1269.85 ns 484.82 ns 2.62

ci-ubuntu-clang

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 273.21 ns 1.59 ns 0.88 ns 1.81
Subscribe empty callbacks to empty observable via pipe operator 267.85 ns 1.59 ns 0.88 ns 1.81

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 556.94 ns 0.31 ns 0.31 ns 1.01
from array of 1 - create + subscribe + current_thread 817.77 ns 4.35 ns 4.32 ns 1.01
concat_as_source of just(1 immediate) create + subscribe 2382.04 ns 187.06 ns 177.82 ns 1.05
defer from array of 1 - defer + create + subscribe + immediate 786.97 ns 0.31 ns 0.31 ns 1.01
interval - interval + take(3) + subscribe + immediate 2245.53 ns 58.66 ns 58.26 ns 1.01
interval - interval + take(3) + subscribe + current_thread 3223.78 ns 31.08 ns 30.88 ns 1.01
from array of 1 - create + as_blocking + subscribe + new_thread 30638.89 ns 30462.19 ns 28186.63 ns 1.08
from array of 1000 - create + as_blocking + subscribe + new_thread 41784.27 ns 37744.23 ns 36698.35 ns 1.03
concat_as_source of just(1 immediate) and just(1,2 immediate)create + subscribe 3635.48 ns 301.98 ns 303.33 ns 1.00

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 1161.00 ns 0.31 ns 0.31 ns 1.01
immediate_just+filter(true)+subscribe 858.88 ns 0.31 ns 0.31 ns 1.01
immediate_just(1,2)+skip(1)+subscribe 1205.60 ns 0.31 ns 0.31 ns 1.01
immediate_just(1,1,2)+distinct_until_changed()+subscribe 895.60 ns 0.62 ns 0.62 ns 1.01
immediate_just(1,2)+first()+subscribe 1386.56 ns 0.31 ns 0.31 ns 1.01
immediate_just(1,2)+last()+subscribe 1026.26 ns 0.31 ns 0.31 ns 1.01
immediate_just+take_last(1)+subscribe 1208.61 ns 0.31 ns 0.31 ns 1.01
immediate_just(1,2,3)+element_at(1)+subscribe 875.32 ns 0.31 ns 0.31 ns 1.01

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 280.34 ns 1.59 ns 0.88 ns 1.81
current_thread scheduler create worker + schedule 391.28 ns 4.97 ns 4.94 ns 1.01
current_thread scheduler create worker + schedule + recursive schedule 855.50 ns 57.56 ns 56.31 ns 1.02

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 854.42 ns 0.31 ns 0.31 ns 1.01
immediate_just+scan(10, std::plus)+subscribe 974.55 ns 0.33 ns 0.31 ns 1.08
immediate_just+flat_map(immediate_just(v*2))+subscribe 2284.59 ns 172.49 ns 169.78 ns 1.02
immediate_just+buffer(2)+subscribe 1533.37 ns 14.00 ns 14.50 ns 0.97
immediate_just+window(2)+subscribe + subscsribe inner 2420.52 ns 940.71 ns 924.17 ns 1.02

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 843.70 ns - - 0.00
immediate_just+take_while(true)+subscribe 858.72 ns 0.31 ns 0.31 ns 1.01

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 2047.58 ns 0.31 ns 0.31 ns 1.01

Combining Operators

name rxcpp rpp prev rpp ratio
immediate_just(immediate_just(1), immediate_just(1)) + merge() + subscribe 3269.60 ns 202.95 ns 204.37 ns 0.99
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 3734.10 ns 160.76 ns 162.58 ns 0.99
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 199.37 ns 199.53 ns 1.00
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 3458.38 ns 856.88 ns 878.94 ns 0.97
immediate_just(1) + zip(immediate_just(2)) + subscribe 2206.68 ns 159.56 ns 160.16 ns 1.00

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 54.27 ns 17.92 ns 17.80 ns 1.01
subscribe 100 observers to publish_subject 213419.00 ns 16355.09 ns 15980.98 ns 1.02
100 on_next to 100 observers to publish_subject 37748.12 ns 20547.16 ns 17335.83 ns 1.19

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1303.09 ns 11.80 ns 11.72 ns 1.01
basic sample with immediate scheduler 1366.11 ns 5.59 ns 6.17 ns 0.91

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 1012.03 ns 0.31 ns 0.31 ns 1.01

Error Handling Operators

name rxcpp rpp prev rpp ratio
create(on_next(1), on_error())+on_error_resume_next(immediate_just(2)))+subscribe 2210.93 ns 1087.48 ns 1025.90 ns 1.06
create(on_error())+retry(1)+subscribe 656.85 ns 157.46 ns 156.86 ns 1.00

ci-windows

General

name rxcpp rpp prev rpp ratio
Subscribe empty callbacks to empty observable 561.69 ns 4.32 ns 4.73 ns 0.91
Subscribe empty callbacks to empty observable via pipe operator 575.65 ns 4.32 ns 4.77 ns 0.91

Sources

name rxcpp rpp prev rpp ratio
from array of 1 - create + subscribe + immediate 1169.61 ns 9.71 ns 9.71 ns 1.00
from array of 1 - create + subscribe + current_thread 1413.69 ns 17.90 ns 17.59 ns 1.02
concat_as_source of just(1 immediate) create + subscribe 3700.65 ns 240.89 ns 240.60 ns 1.00
defer from array of 1 - defer + create + subscribe + immediate 1196.13 ns 9.42 ns 9.41 ns 1.00
interval - interval + take(3) + subscribe + immediate 3704.84 ns 147.11 ns 144.14 ns 1.02
interval - interval + take(3) + subscribe + current_thread 3434.35 ns 67.46 ns 65.39 ns 1.03
from array of 1 - create + as_blocking + subscribe + new_thread 123055.56 ns 115910.00 ns 117644.44 ns 0.99
from array of 1000 - create + as_blocking + subscribe + new_thread 131925.00 ns 130544.44 ns 135666.67 ns 0.96
concat_as_source of just(1 immediate) and just(1,2 immediate)create + subscribe 5383.25 ns 311.53 ns 312.88 ns 1.00

Filtering Operators

name rxcpp rpp prev rpp ratio
immediate_just+take(1)+subscribe 1825.52 ns 25.28 ns 24.97 ns 1.01
immediate_just+filter(true)+subscribe 1333.41 ns 24.35 ns 24.05 ns 1.01
immediate_just(1,2)+skip(1)+subscribe 1714.71 ns 24.06 ns 23.44 ns 1.03
immediate_just(1,1,2)+distinct_until_changed()+subscribe 1676.44 ns 29.00 ns 26.23 ns 1.11
immediate_just(1,2)+first()+subscribe 2058.92 ns 22.82 ns 23.76 ns 0.96
immediate_just(1,2)+last()+subscribe 2045.62 ns 24.06 ns 24.67 ns 0.98
immediate_just+take_last(1)+subscribe 1993.16 ns 76.96 ns 71.44 ns 1.08
immediate_just(1,2,3)+element_at(1)+subscribe 1352.20 ns 27.51 ns 26.56 ns 1.04

Schedulers

name rxcpp rpp prev rpp ratio
immediate scheduler create worker + schedule 475.79 ns 6.48 ns 6.48 ns 1.00
current_thread scheduler create worker + schedule 653.36 ns 13.96 ns 14.02 ns 1.00
current_thread scheduler create worker + schedule + recursive schedule 1103.89 ns 105.72 ns 103.91 ns 1.02

Transforming Operators

name rxcpp rpp prev rpp ratio
immediate_just+map(v*2)+subscribe 1331.31 ns 24.35 ns 24.37 ns 1.00
immediate_just+scan(10, std::plus)+subscribe 1463.67 ns 26.82 ns 26.51 ns 1.01
immediate_just+flat_map(immediate_just(v*2))+subscribe 3509.32 ns 356.47 ns 346.39 ns 1.03
immediate_just+buffer(2)+subscribe 2662.60 ns 71.34 ns 69.32 ns 1.03
immediate_just+window(2)+subscribe + subscsribe inner 4010.29 ns 1302.50 ns 1274.97 ns 1.02

Conditional Operators

name rxcpp rpp prev rpp ratio
immediate_just+take_while(false)+subscribe 1632.03 ns 23.12 ns 23.14 ns 1.00
immediate_just+take_while(true)+subscribe 1355.01 ns 24.35 ns 24.05 ns 1.01

Utility Operators

name rxcpp rpp prev rpp ratio
immediate_just(1)+subscribe_on(immediate)+subscribe 3140.98 ns 11.10 ns 11.10 ns 1.00

Combining Operators

name rxcpp rpp prev rpp ratio
immediate_just(immediate_just(1), immediate_just(1)) + merge() + subscribe 5120.55 ns 433.66 ns 416.12 ns 1.04
immediate_just(1) + merge_with(immediate_just(2)) + subscribe 5478.79 ns 326.23 ns 327.77 ns 1.00
immediate_just(1) + with_latest_from(immediate_just(2)) + subscribe - 302.50 ns 304.04 ns 0.99
immediate_just(immediate_just(1),immediate_just(1)) + switch_on_next() + subscribe 5292.41 ns 942.44 ns 940.39 ns 1.00
immediate_just(1) + zip(immediate_just(2)) + subscribe 3595.89 ns 553.76 ns 548.72 ns 1.01

Subjects

name rxcpp rpp prev rpp ratio
publish_subject with 1 observer - on_next 36.73 ns 19.67 ns 19.47 ns 1.01
subscribe 100 observers to publish_subject 267800.00 ns 27267.50 ns 27931.58 ns 0.98
100 on_next to 100 observers to publish_subject 50810.53 ns 32561.29 ns 32564.52 ns 1.00

Scenarios

name rxcpp rpp prev rpp ratio
basic sample 1930.81 ns 105.89 ns 101.68 ns 1.04
basic sample with immediate scheduler 2288.42 ns 73.84 ns 72.88 ns 1.01

Aggregating Operators

name rxcpp rpp prev rpp ratio
immediate_just+reduce(10, std::plus)+subscribe 1479.83 ns 24.97 ns 24.66 ns 1.01

Error Handling Operators

name rxcpp rpp prev rpp ratio
create(on_next(1), on_error())+on_error_resume_next(immediate_just(2)))+subscribe 2161.34 ns 256.03 ns 257.57 ns 0.99
create(on_error())+retry(1)+subscribe 1698.43 ns 191.60 ns 189.79 ns 1.01

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
CMakePresets.json (1)

Line range hint 1-383: Ensure comprehensive testing of the updated coverage configuration.

The changes in the ci-coverage-clang preset modify how coverage data is generated and potentially how tests are built. While these changes are localized to this specific preset, they could have significant implications on the coverage reporting process.

To ensure these changes don't introduce any regressions:

  1. Run a full coverage analysis using this updated preset and compare the results with the previous configuration.
  2. Verify that all tests are still being executed as expected with the new RPP_BUILD_TESTS_TOGETHER setting.
  3. If possible, document the reasoning behind these changes in a comment within the CMake file or in the project documentation.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between c813bf6 and 32f5aca.

📒 Files selected for processing (2)
  • CMakePresets.json (1 hunks)
  • cmake/coverage.cmake (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • cmake/coverage.cmake
🧰 Additional context used
🔇 Additional comments (1)
CMakePresets.json (1)

181-183: Please clarify the changes in coverage configuration and test building.

I noticed two significant changes in the ci-coverage-clang preset:

  1. The --coverage flag has been removed from CMAKE_CXX_FLAGS. Can you explain the reasoning behind this change? Are we switching to a different coverage tool or method?

  2. A new variable RPP_BUILD_TESTS_TOGETHER has been added and set to true. Could you provide more information about the purpose of this variable and its expected impact on the build process and test execution?

To better understand the impact of these changes, could you run the following commands and share the results?

✅ Verification successful

Coverage Configuration and Test Building Changes Verified

  • The --coverage flag has been successfully removed from all CMake files.
  • The RPP_BUILD_TESTS_TOGETHER variable is utilized in:
    • src/tests/CMakeLists.txt
    • cmake/coverage.cmake

These changes align with the updated coverage instrumentation and test build strategy.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for any other references to coverage flags in the project
rg --type cmake "--coverage"

# Look for uses of the new RPP_BUILD_TESTS_TOGETHER variable
rg --type cmake "RPP_BUILD_TESTS_TOGETHER"

Length of output: 724


Script:

#!/bin/bash
# Corrected command to search for '--coverage' in CMake files
rg --type cmake "--coverage"

Length of output: 441


Script:

#!/bin/bash
# Corrected command to search for '--coverage' in CMake files
rg --type cmake -- "--coverage"

Length of output: 31

@codecov

codecov Bot commented Oct 7, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.31%. Comparing base (92d1dbe) to head (f5837ea).
Report is 3 commits behind head on v2.

Additional details and impacted files
@@            Coverage Diff             @@
##               v2     #653      +/-   ##
==========================================
+ Coverage   95.75%   98.31%   +2.55%     
==========================================
  Files          97      152      +55     
  Lines        1838     7527    +5689     
==========================================
+ Hits         1760     7400    +5640     
- Misses         78      127      +49     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 32f5aca and 8715c1c.

📒 Files selected for processing (2)
  • cmake/coverage.cmake (1 hunks)
  • sonar-project.properties (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • cmake/coverage.cmake
🧰 Additional context used

Comment thread sonar-project.properties Outdated
@sonarqubecloud

sonarqubecloud Bot commented Oct 8, 2024

Copy link
Copy Markdown

@AlexInLog AlexInLog marked this pull request as ready for review October 8, 2024 13:10
@AlexInLog AlexInLog merged commit 5a9172f into v2 Oct 8, 2024
@AlexInLog AlexInLog deleted the coverage branch October 8, 2024 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant